//This code was created with the help of Cairngorm Creator by Tyler Beck.
//The portions of this document created by Cairngorm Creator 
//are provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
//CONDITIONS OF ANY KIND, either express or implied.
//========================================================



package net.optix.ip.model
{
	import com.adobe.cairngorm.model.ModelLocator;
	
	import mx.collections.ArrayCollection;
	
	import net.optix.ip.vo.ClientVO;
	import net.optix.ip.vo.CopyrightVO;
	import net.optix.ip.vo.FirmVO;
	import net.optix.ip.vo.InventionVO;
	import net.optix.ip.vo.InventorVO;
	import net.optix.ip.vo.PractitionerVO;
	import net.optix.ip.vo.TradeMarkVO;
	import net.optix.ip.vo.UserVO;
	import net.optix.ip.vo.ValueVO;

	[Bindable]
	public class ModelLocator implements com.adobe.cairngorm.model.ModelLocator
	{
		private static var modelLocator : net.optix.ip.model.ModelLocator;

		//-----------------------------------------------------------
		public static function getInstance():net.optix.ip.model.ModelLocator
		{
			if ( modelLocator == null )
				modelLocator = new net.optix.ip.model.ModelLocator();
			return modelLocator;
		}

		//-----------------------------------------------------------
		public function ModelLocator():void
		{
			if ( net.optix.ip.model.ModelLocator.modelLocator != null )
				throw new Error( 'Only one ModelLocator instance should be instantiated' );
			
		}
		
		// MODELS ===================================================
		
		public var result:String	=	"";
		public var bSubmit:Boolean	=	true;
		public var close:String		=	"no";
		public var actionInited:String	=	"no";
		
		public var role:int			=	0;
		public var user:UserVO;
		public var client:ClientVO;
		
		public var inventor:InventorVO;
		public var firm:FirmVO;
		public var practitioner:PractitionerVO;
		
		public var inventions:ArrayCollection;
		public var clientInventions:ArrayCollection;
		public var firmInventions:ArrayCollection;
		public var searchInventions:ArrayCollection;
		public var currentInvention:InventionVO;
		public var bidInventions:ArrayCollection;
		public var value:ValueVO;
		
		public var actions:XML;
		public var bids:ArrayCollection;
		public var officeActions:ArrayCollection;
		public var responseActions:XML;
		
		public var inventors:ArrayCollection;
		public var currentInventor:InventorVO;
		public var firms:ArrayCollection;
		public var currentFirm:FirmVO;
		public var practitioners:ArrayCollection;
		public var currentPractitioner:PractitionerVO;
		public var clients:ArrayCollection;
		public var currentClient:ClientVO;
		
		public var url:String	=	"http://localhost/ipserver/index.php/";
       	//public var url:String	=	"http://ip.optix.net/index.php/"; 
		
		public var urlH:String	=	"http://localhost/ipserver/";
		//public var urlH:String	=	"http://ip.optix.net/";
		
		public var view:int;
		public var oldView:int;
		public var actionView:int;
		
		public var actionType:Array		=	["Disclosure","Draft","Filed","Response","Payment"];
		//public var officeResponseType:Array		=	["Response", "Correction", "RCE"];
		public var officeResponseType:Array	=	['Response', 'RCE', 'Correction', 'Notice of Appeal', 'Appeal Brief', 'Reply Brief'];
		public var loadProcess:int;
		
		public var quarters:ArrayCollection;
		public var tracksByFirm:ArrayCollection;
		
		public var inventionView:int;
		
		public var tradeMarks:ArrayCollection;
		public var currentTradeMark:TradeMarkVO;
		public var tradeSecrets:ArrayCollection;
		
		public var copyrights:ArrayCollection;
		public var currentCopyright:CopyrightVO;
		
		public var status:String;
		
		public var userID:int;
		
		public var inventionFirms:ArrayCollection;
		public var trademarkFirms:ArrayCollection;
		public var copyrightFirms:ArrayCollection;
		
		public var tracks:ArrayCollection;
		
		public var matters:ArrayCollection;
	}
}